<layout name="layout" />

<!-- 搜索 -->
<div class="form-div search_form_div">
    <form action="__ACTION__" method="GET" name="search_form">
		<p>
			用户名：
	   		<input type="text" name="username" size="30" value="<?php echo I('get.username'); ?>" />
		</p>
		<p>
			密码：
	   		<input type="text" name="password" size="30" value="<?php echo I('get.password'); ?>" />
		</p>
		<p><input type="submit" value=" 搜索 " class="button" /></p>
    </form>
</div>
<!-- 列表 -->
<div class="list-div" id="listDiv">
	<table cellpadding="3" cellspacing="1" class="table table-hover">
		<thead>
    	<tr class="success">
            <th width="20%">用户名</th>
            <th >角色</th>
			<th width="15%">操作</th>
        </tr>
		</thead>
		<?php foreach ($data as $k => $v): ?>
			<tr class="tron">
				<td><?php echo $v['username']; ?></td>
				<td ><?php echo $v['id'] ==1 ? '超级管理员' : $v['role_name']; ?></td>
		        <td align="center">
		        	<a href="<?php echo U('edit?id='.$v['id'].'&p='.I('get.p')); ?>" title="编辑">编辑</a>
					<?php if($v['id']>1): ?>
					|
	                <a href="<?php echo U('delete?id='.$v['id'].'&p='.I('get.p')); ?>" onclick="return confirm('确定要删除吗？');" title="移除">移除</a>
					<?php endif; ?>
		        </td>
	        </tr>
        <?php endforeach; ?> 
		<?php if(preg_match('/\d/', $page)): ?>  
        <tr><td align="right" nowrap="true" colspan="99" height="30"><?php echo $page; ?></td></tr> 
        <?php endif; ?> 
	</table>
</div>

<link href="__PUBLIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="__PUBLIC__/bootstrap/js/bootstrap.min.js"></script>
<script>
</script>

<script src="__PUBLIC__/Admin/Js/tron.js"></script>